<!--
 * @Description: 
 * @Author: rendc
 * @Date: 2025-09-15 14:14:29
 * @LastEditors: rendc
 * @LastEditTime: 2025-09-15 14:28:31
-->
<!doctype html>
 <html lang="en">
    <head>
    <meta charset="utf-8">  
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <title>
        浮动布局
    </title>
    </head>
    <style>
    body {/* 取消默认的 margin 和 padding */
        margin: 0;
        padding: 0;
    }    
#app {
    border: 1px solid rgb(0, 0, 0);
    height: 200px;    
}
/*
1.只有左右的浮动float left or right 
2.子元素浮动会脱离文档流，导致父元素失去高度

*/
.left {
    float: left;
    width: 50%;
    height: 200px;
}
.right {
    float: right;
    width: 50%;
    height: 200px;
}
    </style>
<body>
    <div id="app">
        <div class="left"style="background-color: red;" >
            左边
        </div>
        <div class="right"style="background-color: blue;">
            右边 
        </div>
         <div class="left"style
